package com.bit.demo2;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: happyiu
 * Date: 2021-11-20
 * Time: 11:51
 */

class Animal {
    public String name = "hello";
    public int age;
    protected int count;

    public Animal(String name,int age) {
        this.name = name;
        this.age = age;
    }

    public void eat() {
        System.out.println(name+"eat()");
        System.out.println(count);
    }
}

class Bird extends Animal{


    public Bird(String name,int age) {
        super(name,age);

    }

    public void fly() {
        System.out.println(super.name+"fly()"+age);
    }
}

class Dog extends Animal{
    /*  public Dog() {
          super();
      }*/
    public Dog(String name,int age) {
        super(name,age);
        //System.out.println("fsfda");
    }
}


public class TestDemo {

    public static void main(String[] args) {
        Dog dog = new Dog("hhh",15);
    }
}
